var e = require("../../../@babel/runtime/helpers/interopRequireDefault")(require("../../../@babel/runtime/regenerator")), t = require("../../../@babel/runtime/helpers/asyncToGenerator"), i = (getApp(), 
require("../../../http/indexApi.js"));

Component({
    properties: {
        info: {
            type: Object,
            observer: function(e, t) {
                var i = [];
                e && (e.couponId && i.push({
                    icon: "/images/vip/vip_gift_coupon.png",
                    title: "包邮券*" + e.couponNum
                }), e.tipCardNum > 0 && i.push({
                    icon: "/images/vip/vip_gift_tip.png",
                    title: "提示卡*" + e.tipCardNum
                }), e.displayCardNum > 0 && i.push({
                    icon: "/images/vip/vip_gift_show.png",
                    title: "显示卡*" + e.displayCardNum
                })), this.setData({
                    dataList: i
                });
            }
        }
    },
    data: {},
    methods: {
        nothing: function() {},
        closeOnTap: function() {
            this.readMsg(), this.setData({
                info: null
            });
        },
        readMsg: function() {
            return t(e.default.mark(function t() {
                return e.default.wrap(function(e) {
                    for (;;) switch (e.prev = e.next) {
                      case 0:
                        return e.prev = 0, e.next = 3, i.readVipChangeInfo();

                      case 3:
                        e.next = 8;
                        break;

                      case 5:
                        e.prev = 5, e.t0 = e.catch(0), console.log("readVipChangeInfo:", e.t0);

                      case 8:
                      case "end":
                        return e.stop();
                    }
                }, t, null, [ [ 0, 5 ] ]);
            }))();
        }
    }
});